var logger = require('./util').logger('filter');

exports.authorize = function(req, res, next) {
    if ((!req.session || !req.session.user) && req.query.client != 'true') {
        logger.info('======NOT SIGNON ERROR======');

        res.statusCode = 555;
        res.send({code: 'NOT_SIGNON', data: {}});
    } else {
        next();
    }
}